package com.ruoyi.edu.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import com.ruoyi.common.annotation.Excel;

import java.io.Serializable;
import java.util.Date;
import java.util.Map;
import java.util.HashMap;
import java.math.BigDecimal;

/**
 * 课程对象 edu_course
 * 
 * @author niruichen
 * @date 2020-12-22
 */
@Data
@ToString
@EqualsAndHashCode
@NoArgsConstructor
@Accessors(chain = true)
@TableName("edu_course")
public class EduCourse implements Serializable {

private static final long serialVersionUID=1L;


    /** 课程ID */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    /** 课程讲师ID */
    @Excel(name = "课程讲师ID")
    private String teacherId;

    /** 课程专业ID */
    @Excel(name = "课程专业ID")
    private String subjectId;

    /** 课程简介 */
    @Excel(name = "课程简介")
    private String description;

    /** 课程标题 */
    @Excel(name = "课程标题")
    private String title;

    /** 课程价格 */
    @Excel(name = "课程价格")
    private BigDecimal price;

    /** 总课时 */
    @Excel(name = "总课时")
    private Integer lessonNum;

    /** 课程封面 */
    @Excel(name = "课程封面")
    private String cover;

    /** 销售数量 */
    @Excel(name = "销售数量")
    private Long buyCount;

    /** 浏览数量 */
    @Excel(name = "浏览数量")
    private Long viewCount;

    /** 乐观锁 */
    @Excel(name = "乐观锁")
    private BigDecimal version;

    /** 课程状态 */
    @Excel(name = "课程状态")
    private String status;

    /** 逻辑删除 1（true）已删除， 0（false）未删除 */
    @Excel(name = "逻辑删除" )
    @TableLogic
    private Long deleted;

    /** 创建时间 */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /** 更新时间 */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @TableField(exist = false)
    private Map<String, Object> params = new HashMap<>();
}
